// reduce 的用法
let a = [1, 2, 3, 4, 5];

function printMsg(fn) {
  console.log(fn);
}

printMsg(a.reduce((x, y) => x + y, 12));
printMsg(a.reduce((x, y) => x * y, 0));
